package io.renren.modules.generator.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import io.renren.modules.generator.dao.LeaveinfoDao;
import io.renren.modules.generator.entity.LeaveinfoEntity;
import io.renren.modules.generator.service.LeaveinfoService;
import io.renren.util.UUIDUtil;



@Service("leaveinfoService")
public class LeaveinfoServiceImpl implements LeaveinfoService {
	@Autowired
	private LeaveinfoDao leaveinfoDao;
	
	@Override
	public LeaveinfoEntity queryObject(String leaveno){
		return leaveinfoDao.queryObject(leaveno);
	}
	
	@Override
	public List<LeaveinfoEntity> queryList(Map<String, Object> map){
		return leaveinfoDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return leaveinfoDao.queryTotal(map);
	}
	
	@Override
	public void save(LeaveinfoEntity leaveinfo){
		leaveinfo.setLeaveno(UUIDUtil.getOrderIdByUUId());
		leaveinfoDao.save(leaveinfo);
	}
	
	@Override
	public void update(LeaveinfoEntity leaveinfo){
		leaveinfoDao.update(leaveinfo);
	}
	
	@Override
	public void delete(String leaveno){
		leaveinfoDao.delete(leaveno);
	}
	
	@Override
	public void deleteBatch(String[] leavenos){
		leaveinfoDao.deleteBatch(leavenos);
	}
	
}
